package pro.shushi.pamirs.eip.api.enmu;

import pro.shushi.pamirs.meta.annotation.Errors;
import pro.shushi.pamirs.meta.common.enmu.ExpBaseEnum;

@Errors(displayName = "集成接口模块错误枚举")
public enum EipExpEnumerate implements ExpBaseEnum {

    SYSTEM_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10051000, "系统异常"),
    INTEGRATION_INTERFACE_NULL_ERROR(ERROR_TYPE.BIZ_ERROR, 10051001, "集成接口不存在"),
    INTEGRATION_INTERFACE_ENABLED_ERROR(ERROR_TYPE.BIZ_ERROR, 10051002, "集成接口启用失败，请联系技术人员提供支持"),
    INTEGRATION_INTERFACE_DISABLED_ERROR(ERROR_TYPE.BIZ_ERROR, 10051003, "集成接口禁用失败，请联系技术人员提供支持"),
    OPEN_INTERFACE_ENABLED_ERROR(ERROR_TYPE.BIZ_ERROR, 10051004, "开放接口启用失败，请联系技术人员提供支持"),
    OPEN_INTERFACE_DISABLED_ERROR(ERROR_TYPE.BIZ_ERROR, 10051005, "开放接口禁用失败，请联系技术人员提供支持"),
    ROUTE_DEFINITION_ENABLED_ERROR(ERROR_TYPE.BIZ_ERROR, 10051006, "路由定义启用失败，请联系技术人员提供支持"),
    ROUTE_DEFINITION_DISABLED_ERROR(ERROR_TYPE.BIZ_ERROR, 10051007, "路由定义禁用失败，请联系技术人员提供支持"),
    GET_REQUEST_PARAM_PROCESSOR_NULL_ERROR(ERROR_TYPE.BIZ_ERROR, 10051008, "未配置请求参数处理器"),
    GET_RESPONSE_PARAM_PROCESSOR_NULL_ERROR(ERROR_TYPE.BIZ_ERROR, 10051009, "未配置响应参数处理器"),
    GET_EXCEPTION_PARAM_PROCESSOR_NULL_ERROR(ERROR_TYPE.BIZ_ERROR, 10051010, "未配置异常参数处理器"),
    GET_SERIALIZABLE_NULL_ERROR(ERROR_TYPE.BIZ_ERROR, 10051011, "未配置序列化函数"),
    GET_DESERIALIZATION_NULL_ERROR(ERROR_TYPE.BIZ_ERROR, 10051012, "未配置反序列化函数"),
    RESPONSE_PARAM_SERIALIZABLE_DATA_ERROR(ERROR_TYPE.BIZ_ERROR, 10051013, "请求参数序列化失败，请确认接口序列化函数是否正确"),
    REFRESH_SECRET_NO_TENANT_ERROR(ERROR_TYPE.BIZ_ERROR, 10051014, "无租户信息，操作异常"),
    INVALID_APPLICATION_KEY_ERROR(ERROR_TYPE.BIZ_ERROR, 10051015, "无效的Application Key"),
    INVALID_APPLICATION_SECRET_ERROR(ERROR_TYPE.BIZ_ERROR, 10051016, "无效的Application Secret"),
    INTERFACE_NAME_EXIST(ERROR_TYPE.BIZ_ERROR, 10051017, "接口技术名称已存在"),
    PARAM_REQUIRED(ERROR_TYPE.BIZ_ERROR, 10051018, "缺少必填参数"),
    PARAM_OVER_SIZE(ERROR_TYPE.BIZ_ERROR, 10051019, "参数过长"),
    PARAM_FILE_TYPE_DATA_NULL_ERROR(ERROR_TYPE.BIZ_ERROR, 10051020, "File类型参数获取文件流失败"),
    OPEN_APPLICATION_NAME_IS_NULL(ERROR_TYPE.BIZ_ERROR, 10051021, "开放应用名称不能为空"),
    OPEN_APPLICATION_NAME_EXIST(ERROR_TYPE.BIZ_ERROR, 10051022, "开放应用名称不能与其他应用重复"),
    OPEN_APPLICATION_NOT_EXIST(ERROR_TYPE.BIZ_ERROR, 10051023, "开放应用不存在或已删除"),
    OPEN_INTERFACE_REQUEST_ERROR(ERROR_TYPE.BIZ_ERROR, 10051024, "请求参数异常"),
    OPEN_INTERFACE_NOT_EXIST(ERROR_TYPE.BIZ_ERROR, 10051025, "开放接口不存在或已删除"),
    OPEN_INTERFACE_CREATE_REQUEST_ERROR(ERROR_TYPE.BIZ_ERROR, 10051026, "开放接口数据校验异常"),
    EIP_SEND_REQUEST_ERROR(ERROR_TYPE.BIZ_ERROR, 10051027, "集成接口请求失败"),
    EIP_PARAM_MAPPING_CREATE_OR_UPDATE_ERROR(ERROR_TYPE.BIZ_ERROR, 10051028, "集成参数映射创建失败"),
    EIP_SEND_REQUEST_PARAM_NULL(ERROR_TYPE.BIZ_ERROR, 10051029, "请求参数缺失"),
    EIP_JSON_PARSING_ERROR(ERROR_TYPE.BIZ_ERROR, 10051030, "数据解析失败，不能识别的json数据"),
    EIP_RESPONSE_VALUE_EXP_IS_NULL(ERROR_TYPE.BIZ_ERROR, 10051031, "响应参数映射失败，取值表达式为空"),
    EIP_RESPONSE_PARAM_NO_MATCH(ERROR_TYPE.BIZ_ERROR, 10051032, "响应参数映射失败，参数类型不匹配"),
    EIP_REQUEST_EXPRESSION_ERROR(ERROR_TYPE.BIZ_ERROR, 10051033, "请求参数表达式识别失败"),
    EIP_PARAM_MAPPING_IS_NULL(ERROR_TYPE.BIZ_ERROR, 10051034, "未查询到参数映射信息"),
    EIP_RESPONSE_CONVERT_ERROR(ERROR_TYPE.BIZ_ERROR, 10051035, "响应参数转换失败"),
    EIP_IP_ERROR(ERROR_TYPE.BIZ_ERROR, 10051036, "不能识别的IP地址"),
    EIP_IP_NULL_ERROR(ERROR_TYPE.BIZ_ERROR, 10051037, "IP地址为空，白名单校验异常"),
    EIP_IP_CIDR_ILLEGAL(ERROR_TYPE.BIZ_ERROR, 10051038, "非法的IP地址或网段"),
    EIP_CONTENT_TYPE_ERROR(ERROR_TYPE.BIZ_ERROR, 10051039, "Unsupported Media Type"),
    EIP_FILE_EXCEL_FMT_ERROR(ERROR_TYPE.BIZ_ERROR, 10051040, "未能解析文件，请检查文件格式"),
    SCENE_DEFINITION_IS_EMPTY(ERROR_TYPE.BIZ_ERROR, 10051041, "场景定义为空"),
    SCENE_DEFINITION_IS_ERROR(ERROR_TYPE.BIZ_ERROR, 10051042, "场景定义错误"),
    SCENE_DEFINITION_NAME_ISNULL(ERROR_TYPE.BIZ_ERROR, 10051043, "场景定义错误,场景名称为空"),
    SCENE_DEFINITION_TECH_NAME_ISNULL(ERROR_TYPE.BIZ_ERROR, 10051044, "场景定义错误场景技术名称为空"),
    SCENE_DEFINITION_NODE_LIST_IS_EMPTY(ERROR_TYPE.BIZ_ERROR, 10051045, "场景节点列表为空"),
    SCENE_DEFINITION_NODE_EMPTY(ERROR_TYPE.BIZ_ERROR, 10051046, "场景节点配置为空"),
    SCENE_DEFINITION_NODE_ERROR(ERROR_TYPE.BIZ_ERROR, 10051047, "场景节点配置错误"),
    SCENE_DEFINITION_NODE_DATA_SYSTEM_ISNULL(ERROR_TYPE.BIZ_ERROR, 10051048, "场景节点配置错误:数据系统为空"),
    SCENE_DEFINITION_NODE_TYPE_ISNULL(ERROR_TYPE.BIZ_ERROR, 10051049, "场景节点配置错误:节点类型为空"),
    SCENE_DEFINITION_NODE_UNSET_FUN(ERROR_TYPE.BIZ_ERROR, 10051050, "场景节点配置错误:函数节点未配置处理函数"),
    SCENE_DEFINITION_NODE_UNSET_API(ERROR_TYPE.BIZ_ERROR, 10051051, "场景节点配置错误:集成接口节点未配置接口"),
    SCENE_DEFINITION_NODE_UNSET_COMPOSITE_API(ERROR_TYPE.BIZ_ERROR, 10051052, "场景节点配置错误:组合接口节点未配置接口"),
    SCENE_DEFINITION_NODE_UNKNOWN_TYPE(ERROR_TYPE.BIZ_ERROR, 10051053, "场景节点配置错误:未知的节点类型"),
    SCENE_INSTANCE_IS_EMPTY(ERROR_TYPE.BIZ_ERROR, 10051054, "场景实例为空"),
    SCENE_INSTANCE_IS_ERROR(ERROR_TYPE.BIZ_ERROR, 10051055, "场景实例错误"),
    SCENE_INSTANCE_CREATE_ERRPR(ERROR_TYPE.BIZ_ERROR, 10051056, "场景实例创建异常"),
    SCENE_INSTANCE_CREATE_UNSELECT_DATA_NODE(ERROR_TYPE.BIZ_ERROR, 10051057, "场景实例创建异常:未选择数据节点"),
    SCENE_INSTANCE_CREATE_SELECT_ERROR_DATA_NODE(ERROR_TYPE.BIZ_ERROR, 10051058, "场景实例创建异常:请选择正确的数据节点"),
    SCENE_INSTANCE_NAME_ISNULL(ERROR_TYPE.BIZ_ERROR, 10051059, "场景实例错误:实例名称为空"),
    SCENE_INSTANCE_SOURCE_SCENE_ISNULL(ERROR_TYPE.BIZ_ERROR, 10051060, "场景实例错误:来源场景为空"),
    SCENE_INSTANCE_DATA_SOURCE_SYSTEM_ISNULL(ERROR_TYPE.BIZ_ERROR, 10051061, "场景实例错误:数据来源系统为空"),
    SCENE_INSTANCE_DATA_RECEIVE_SYSTEM_ISNULL(ERROR_TYPE.BIZ_ERROR, 10051062, "场景实例错误:数据接收系统为空"),
    SCENE_INSTANCE_EXECUTE_ERRPR(ERROR_TYPE.BIZ_ERROR, 10051063, "场景实例执行异常"),
    CONN_GROUP_CHECK_ERROR(ERROR_TYPE.BIZ_ERROR, 10051064, "业务域数据校验异常"),
    CONN_GROUP_DELETE_RELATION(ERROR_TYPE.BIZ_ERROR, 10051065, "当前业务域已被其他数据引用，无法删除"),
    EIP_API_NOT_INIT(ERROR_TYPE.BIZ_ERROR, 10051066, "接口未初始化"),
    EIP_APPLICATION_NAME_ISNULL(ERROR_TYPE.BIZ_ERROR, 10051067, "应用名称不能为空"),
    EIP_APPLICATION_NAME_EXIST(ERROR_TYPE.BIZ_ERROR, 10051068, "应用名称不能与其他应用重复"),
    EIP_APPLICATION_UNKNOWN_ENCRYPTION_TYPE(ERROR_TYPE.BIZ_ERROR, 10051069, "无法识别的加密类型"),
    EIP_APPLICATION_CREATE_SECRET_FAIL(ERROR_TYPE.BIZ_ERROR, 10051070, "无法生成应用密钥，请稍后再试"),
    EIP_APPLICATION_NAME_CANNOT_MODIFY(ERROR_TYPE.BIZ_ERROR, 10051071, "应用名称无法修改"),
    EIP_APPLICATION_KEY_INVALID(ERROR_TYPE.BIZ_ERROR, 10051072, "无效的Application Key"),
    EIP_PROCESSOR_TYPE_INVALID(ERROR_TYPE.BIZ_ERROR, 10051073, "无效的参数处理器类型"),
    EIP_PROCESSOR_PAGESIZE_QUERY_ERROR(ERROR_TYPE.BIZ_ERROR, 10051074, "不设置每页大小时，必须使用分页判定函数来决定是否需要查询"),
    SCENE_INSTANCE_EXECUTE_ERRPR_CODE_NOMATCH(ERROR_TYPE.BIZ_ERROR, 10051075, "场景实例执行异常,实例编码不匹配"),
    SCENE_INSTANCE_EXECUTE_ERRPR_NOREL_ROUTE(ERROR_TYPE.BIZ_ERROR, 10051076, "场景实例执行异常,实例未关联eip路由"),
    EIP_APPLICATION_AUTH_INFO_ERROR(ERROR_TYPE.BIZ_ERROR, 10051077, "集成应用认证信息异常"),
    EIP_APPLICATION_REFRESH_SECRET_FAIL(ERROR_TYPE.BIZ_ERROR, 10051078, "刷新Secret失败，请联系技术人员进行处理"),
    EIP_DB_TYPE_ERROR(ERROR_TYPE.BIZ_ERROR, 10051079, "不支持连接的数据库类型"),
    EIP_CB_TYPE_ERROR(ERROR_TYPE.BIZ_ERROR, 10051080, "不支持的熔断类型"),
    EIP_CB_STATUS_OPEN(ERROR_TYPE.BIZ_ERROR, 10051081, "当前接口处于熔断状态"),
    EIP_CB_STATUS_HALF_OPEN(ERROR_TYPE.BIZ_ERROR, 10051082, "当前接口处于熔断尝试恢复状态"),
    EIP_CB_TTL_WAIT_DURATION_ERROR(ERROR_TYPE.BIZ_ERROR, 10051083, "非法的熔断时间"),
    EIP_CB_NOT_FUSE_RECOVERY_POLICY(ERROR_TYPE.BIZ_ERROR, 10051084, "不支持的熔断恢复策略"),
    EIP_CB_NOT_STATUS(ERROR_TYPE.BIZ_ERROR, 10051085, "不支持的熔断状态"),
    EIP_CB_REFRESH_ERROR(ERROR_TYPE.BIZ_ERROR, 10051086, "熔断器刷新失败"),
    EIP_CB_RULE_NAME_INVALID(ERROR_TYPE.BIZ_ERROR, 10051087, "熔断规则名称格式非法，仅支持中英文、数字、下划线，长度2~50"),
    EIP_CB_TYPE_NULL(ERROR_TYPE.BIZ_ERROR, 10051088, "熔断器类型不能为空"),
    EIP_CB_NO_INTERFACE_DEFINED(ERROR_TYPE.BIZ_ERROR, 10051089, "未配置集成接口"),
    EIP_CB_STATISTICAL_DURATION_INVALID(ERROR_TYPE.BIZ_ERROR, 10051090, "统计时长非法，范围应为1~7200秒"),
    EIP_CB_MIN_REQUEST_COUNT_INVALID(ERROR_TYPE.BIZ_ERROR, 10051091, "最小请求数非法，应为大于等于1的整数"),
    EIP_CB_SLOW_CALL_THRESHOLD_INVALID(ERROR_TYPE.BIZ_ERROR, 10051092, "慢调用熔断比例阈值非法，应为1~100之间的整数"),
    EIP_CB_SLOW_CALL_RESPONSE_TIME_INVALID(ERROR_TYPE.BIZ_ERROR, 10051093, "慢调用响应时间阈值非法，应为大于0的毫秒值"),
    EIP_CB_FAILURE_RATE_THRESHOLD_INVALID(ERROR_TYPE.BIZ_ERROR, 10051094, "异常熔断比例阈值非法，应为1~100之间的整数"),
    EIP_CB_DURATION_INVALID(ERROR_TYPE.BIZ_ERROR, 10051095, "熔断时长非法，应为大于等于1秒"),
    EIP_CB_RECOVERY_STRATEGY_INVALID(ERROR_TYPE.BIZ_ERROR, 10051096, "熔断恢复策略非法，仅支持SINGLE_PROBE"),
    EIP_HTTP_CODE_VALUE_ILLEGAL(ERROR_TYPE.BIZ_ERROR, 10051097, "HTTP状态码应在100～599之间"),
    PARAM_RATE_LIMIT_PARAM_NULL(ERROR_TYPE.BIZ_ERROR, 10051098, "流控存在必填参数为空"),
    PARAM_APPLICATION_NULL(ERROR_TYPE.BIZ_ERROR, 10051099, "所属应用不存在"),
    PARAM_OPEN_INTERFACE_NULL(ERROR_TYPE.BIZ_ERROR, 10051100, "开放接口不存在"),
    EIP_RATE_LIMIT_TIP(ERROR_TYPE.BIZ_ERROR, 10051101, "Too Many Requests - 请求频率超限，请稍后重试"),
    EIP_X_READ_IP_NULL(ERROR_TYPE.BIZ_ERROR, 10051102, "未获取到真实IP地址"),
    EIP_UNSUPPORTED_INTERFACE_TYPE(ERROR_TYPE.BIZ_ERROR, 10051103, "不支持的接口类型"),
    EIP_DB_DRIVER_IS_NULL(ERROR_TYPE.BIZ_ERROR, 10051104, "未获取数据库驱动"),
    ;

    private final ERROR_TYPE type;

    private final int code;

    private final String msg;

    EipExpEnumerate(ERROR_TYPE type, int code, String msg) {
        this.type = type;
        this.code = code;
        this.msg = msg;
    }

    public ERROR_TYPE getType() {
        return type;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
